
package copytranslation;

import copytranslation.read.ReadExcel;
import copytranslation.write.writeExcel;

/**
 *
 * @author srkrishnan
 */
public class CopyTranslation {

    static String SRCPATH="C:\\Documents and Settings\\srkrishnan\\My Documents\\cpftranslation\\A";
    static String DESTPATH="C:\\Documents and Settings\\srkrishnan\\My Documents\\cpftranslation\\B";
    final static int    ENG_COLUMN_INDEX_READ_EXCEL=0;
    final static int    JA_COLUMN_INDEX_READ_EXCEL=5;
    final static int    ENG_COLUMN_INDEX_WRITE_EXCEL=0;
    final static int    JA_COLUMN_INDEX_WRITE_EXCEL=1;
    
    public static void main(String[] args) {
        if(args.length>0 && args[0]!=null)
            SRCPATH=args[0];
        ReadExcel readexcel=new ReadExcel(SRCPATH);
        readexcel.setKeyColumnindex(ENG_COLUMN_INDEX_READ_EXCEL);
        readexcel.setValueColumnindex(JA_COLUMN_INDEX_READ_EXCEL);
        readexcel.buildHash();
        
        if(args.length>1 && args[1]!=null)
            SRCPATH=args[1];
        writeExcel writeexcel=new writeExcel(DESTPATH);
        writeexcel.setKeyColumnindex(ENG_COLUMN_INDEX_WRITE_EXCEL);
        writeexcel.setValueColumnindex(JA_COLUMN_INDEX_WRITE_EXCEL);
        writeexcel.addTranslationLabelstoExcel();
    }
}
